Register Promotion by Sparse Partial Redundancy Elimination

نویسندگان

  • Raymond Lo
  • Fred Chow
  • Robert Kennedy
  • Shin-Ming Liu
  • Peng Tu
چکیده

An algorithm for register promotion is presented based on the observation that the circumstances for promoting a memory location's value to register coincide with situations where the program exhibits partial redundancy between accesses to the memory location. The recent SSAPRE algorithm for eliminating partial redundancy using a sparse SSA representation forms the foundation for the present algorithm to eliminate redundancy among memory accesses, enabling us to achieve both computational and live range op-timality in our register promotion results. We discuss how to eeect speculative code motion in the SSAPRE framework. We present two diierent algorithms for performing speculative code motion: the conservative speculation algorithm used in the absence of proole data, and the the proole-driven speculation algorithm used when proole data are available. We deene the static single use (SSU) form and develop the dual of the SSAPRE algorithm, called SSUPRE, to perform the partial redundancy elimination of stores. We provide measurement data on the SPECint95 benchmark suite to demonstrate the eeectiveness of our register promotion approach in removing loads and stores. We also study the relative performance of the diierent speculative code motion strategies when applied to scalar loads and stores. 1 Introduction Register allocation is among the most important functions performed by an optimizing compiler. Prior to register allocation, it is necessary to identify the data items in the program that are candidates for register allocation. To represent register allocation candidates, compilers commonly use an unlimited number of pseudo-registers CAC + 81, TWL + 91]. Pseudo-registers are also called symbolic registers or virtual registers, to distinguish them from real or physical registers. Pseudo-registers have no alias, and the process of assigning them to real registers involves only renaming them. Thus, using pseudo-registers simpliies the register allocator's job.

برای دانلود متن کامل این مقاله و بیش از 32 میلیون مقاله دیگر ابتدا ثبت نام کنید

ثبت نام

اگر عضو سایت هستید لطفا وارد حساب کاربری خود شوید

منابع مشابه

Register Pressure Sensitive Redundancy Elimination

Redundancy elimination optimizations avoid repeated computation of the same value by computing the value once, saving it in a temporary, and reusing the value from the temporary when it is needed again. Examples of redundancy elimination optimizations include common subexpression elimination, loop invariant code motion and partial redundancy elimination. We demonstrate that the introduction of ...

متن کامل

Partial Redundancy Elimination in SSA

The SSAPRE algorithm for performing partial redundancy elimination based entirely on SSA form is presented. The algorithm is formulated based on a new conceptual framework, the fac-tored redundancy graph, for analyzing redundancy, and represents the rst sparse approach to the classical problem of partial redundancy elimination. At the same time, it provides new perspectives on the problem and o...

متن کامل

Code-Size Sensitive Partial Redundancy Elimination

Program optimization focuses usually on improving the runtime efficiency of a program. Its impact on the code size is typically not considered a concern. In fact, classical optimizations often cause code replication without providing any means allowing a user to control this. This limits their adequacy for applications, where code size is critical, too, like embedded systems or smart cards. In ...

متن کامل

Partial Redundancy Elimination on Predicated Code

Partial redundancy elimination (PRE) is one of the most widespread optimizations in compilers. However, current PRE-techniques are inadequate to handle predicated code, i.e., programs where instructions are guarded by a 1-bit register that dynamically controls whether the effect of instruction should be committed or nullified. In fact, to exclude corrupting the semantics they must be overly con...

متن کامل

Scalar Replacement in the Presence of Conditional Control Flow

Most conventional compilers fail to allocate array elements to registers because standard dataflow analysis treats arrays like scalars, making it impossible to analyze the definitions and uses of individual array elements. This deficiency is particularly troublesome for floating-point registers, which are most often used as temporary repositories for subscripted variables. This paper presents a...

متن کامل

ذخیره در منابع من


  با ذخیره ی این منبع در منابع من، دسترسی به آن را برای استفاده های بعدی آسان تر کنید

برای دانلود متن کامل این مقاله و بیش از 32 میلیون مقاله دیگر ابتدا ثبت نام کنید

ثبت نام

اگر عضو سایت هستید لطفا وارد حساب کاربری خود شوید

عنوان ژورنال:

دوره   شماره 

صفحات  -

تاریخ انتشار 1998